Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_ffi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Van Loc
flutter_ffi
Commits
6b487091
Commit
6b487091
authored
Jun 05, 2024
by
Nguyen Viet Toan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios native add ffi
parent
431e9ae4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
125 additions
and
9 deletions
+125
-9
Debug.xcconfig
ios/Flutter/Debug.xcconfig
+1
-0
Release.xcconfig
ios/Flutter/Release.xcconfig
+1
-0
Podfile
ios/Podfile
+44
-0
Podfile.lock
ios/Podfile.lock
+22
-0
project.pbxproj
ios/Runner.xcodeproj/project.pbxproj
+0
-0
contents.xcworkspacedata
ios/Runner.xcworkspace/contents.xcworkspacedata
+3
-0
Info.plist
ios/Runner/Info.plist
+4
-4
native_add.cpp
ios/native_add.cpp
+5
-5
Flutter-Debug.xcconfig
macos/Flutter/Flutter-Debug.xcconfig
+1
-0
Flutter-Release.xcconfig
macos/Flutter/Flutter-Release.xcconfig
+1
-0
Podfile
macos/Podfile
+43
-0
No files found.
ios/Flutter/Debug.xcconfig
View file @
6b487091
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
ios/Flutter/Release.xcconfig
View file @
6b487091
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
ios/Podfile
0 → 100644
View file @
6b487091
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
project
'Runner'
,
{
'Debug'
=>
:debug
,
'Profile'
=>
:release
,
'Release'
=>
:release
,
}
def
flutter_root
generated_xcode_build_settings_path
=
File
.
expand_path
(
File
.
join
(
'..'
,
'Flutter'
,
'Generated.xcconfig'
),
__FILE__
)
unless
File
.
exist?
(
generated_xcode_build_settings_path
)
raise
"
#{
generated_xcode_build_settings_path
}
must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File
.
foreach
(
generated_xcode_build_settings_path
)
do
|
line
|
matches
=
line
.
match
(
/FLUTTER_ROOT\=(.*)/
)
return
matches
[
1
].
strip
if
matches
end
raise
"FLUTTER_ROOT not found in
#{
generated_xcode_build_settings_path
}
. Try deleting Generated.xcconfig, then run flutter pub get"
end
require
File
.
expand_path
(
File
.
join
(
'packages'
,
'flutter_tools'
,
'bin'
,
'podhelper'
),
flutter_root
)
flutter_ios_podfile_setup
target
'Runner'
do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods
File
.
dirname
(
File
.
realpath
(
__FILE__
))
target
'RunnerTests'
do
inherit!
:search_paths
end
end
post_install
do
|
installer
|
installer
.
pods_project
.
targets
.
each
do
|
target
|
flutter_additional_ios_build_settings
(
target
)
end
end
ios/Podfile.lock
0 → 100644
View file @
6b487091
PODS:
- Flutter (1.0.0)
- permission_handler_apple (9.3.0):
- Flutter
DEPENDENCIES:
- Flutter (from `Flutter`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
EXTERNAL SOURCES:
Flutter:
:path: Flutter
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
COCOAPODS: 1.15.2
ios/Runner.xcodeproj/project.pbxproj
View file @
6b487091
This diff is collapsed.
Click to expand it.
ios/Runner.xcworkspace/contents.xcworkspacedata
View file @
6b487091
...
...
@@ -4,4 +4,7 @@
<FileRef
location =
"group:Runner.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</Workspace>
ios/Runner/Info.plist
View file @
6b487091
...
...
@@ -2,6 +2,8 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CADisableMinimumFrameDurationOnPhone
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
...
...
@@ -24,6 +26,8 @@
<
string
>
$
(
FLUTTER_BUILD_NUMBER
)<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIApplicationSupportsIndirectInputEvents
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIMainStoryboardFile
<
/k
e
y
>
...
...
@@ -41,9 +45,5 @@
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
CADisableMinimumFrameDurationOnPhone
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UIApplicationSupportsIndirectInputEvents
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
ios/
Runner.xcworkspace/
native_add.cpp
→
ios/native_add.cpp
View file @
6b487091
#include <stdint.h>
#include <string>
//#include "src/detector/nudedetector.h"
#include <android/log.h>
#define LOGR(x) __android_log_print(ANDROID_LOG_DEBUG, "flutter", x);
//
#include <android/log.h>
//
#define LOGR(x) __android_log_print(ANDROID_LOG_DEBUG, "flutter", x);
extern
"C"
__attribute__
((
visibility
(
"default"
)))
__attribute__
((
used
))
int32_t
native_add
(
int32_t
x
,
int32_t
y
)
{
LOGR
(
"test from c native_add"
)
//
LOGR("test from c native_add")
return
x
+
y
;
}
extern
"C"
__attribute__
((
visibility
(
"default"
)))
__attribute__
((
used
))
float
native_add_floats
(
float
x
,
float
y
)
{
LOGR
(
"test from c native_add_floats"
);
//
LOGR("test from c native_add_floats");
return
x
+
y
;
}
extern
"C"
__attribute__
((
visibility
(
"default"
)))
__attribute__
((
used
))
bool
native_compare_int
(
int32_t
x
,
int32_t
y
)
{
LOGR
(
"test from c native_compare_int"
);
//
LOGR("test from c native_compare_int");
return
x
==
y
;
}
...
...
macos/Flutter/Flutter-Debug.xcconfig
View file @
6b487091
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
macos/Flutter/Flutter-Release.xcconfig
View file @
6b487091
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
macos/Podfile
0 → 100644
View file @
6b487091
platform
:osx
,
'10.14'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
project
'Runner'
,
{
'Debug'
=>
:debug
,
'Profile'
=>
:release
,
'Release'
=>
:release
,
}
def
flutter_root
generated_xcode_build_settings_path
=
File
.
expand_path
(
File
.
join
(
'..'
,
'Flutter'
,
'ephemeral'
,
'Flutter-Generated.xcconfig'
),
__FILE__
)
unless
File
.
exist?
(
generated_xcode_build_settings_path
)
raise
"
#{
generated_xcode_build_settings_path
}
must exist. If you're running pod install manually, make sure
\"
flutter pub get
\"
is executed first"
end
File
.
foreach
(
generated_xcode_build_settings_path
)
do
|
line
|
matches
=
line
.
match
(
/FLUTTER_ROOT\=(.*)/
)
return
matches
[
1
].
strip
if
matches
end
raise
"FLUTTER_ROOT not found in
#{
generated_xcode_build_settings_path
}
. Try deleting Flutter-Generated.xcconfig, then run
\"
flutter pub get
\"
"
end
require
File
.
expand_path
(
File
.
join
(
'packages'
,
'flutter_tools'
,
'bin'
,
'podhelper'
),
flutter_root
)
flutter_macos_podfile_setup
target
'Runner'
do
use_frameworks!
use_modular_headers!
flutter_install_all_macos_pods
File
.
dirname
(
File
.
realpath
(
__FILE__
))
target
'RunnerTests'
do
inherit!
:search_paths
end
end
post_install
do
|
installer
|
installer
.
pods_project
.
targets
.
each
do
|
target
|
flutter_additional_macos_build_settings
(
target
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment