Skip to content

Commit c2b9c79

Browse files
committed
Fixed android jni module name. Added contitional check for xcode project c++ files
1 parent c3fd423 commit c2b9c79

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

templates/cppLibrary/android/cpp-adapter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
extern "C"
55
JNIEXPORT jint JNICALL
6-
Java_com_<%= project.package %>_<%= project.name %>_nativeMultiply(JNIEnv *env, jclass type, jint a, jint b) {
6+
Java_com_<%= project.package %>_<%= project.name %>Module_nativeMultiply(JNIEnv *env, jclass type, jint a, jint b) {
77
return example::multiply(a, b);
88
}

templates/library/ios/<%= project.name %>.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
<%if (project.useCpp==true) {%>
1011
5E46D8CD2428F78900513E24 /* example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5E46D8CB2428F78900513E24 /* example.cpp */; };
12+
<%}%>
1113
5E555C0D2413F4C50049A1A2 /* <%= project.name %>.mm in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* <%= project.name %>.mm */; };
1214
/* End PBXBuildFile section */
1315

@@ -25,8 +27,10 @@
2527

2628
/* Begin PBXFileReference section */
2729
134814201AA4EA6300B7C361 /* lib<%= project.name %>.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = lib<%= project.name %>.a; sourceTree = BUILT_PRODUCTS_DIR; };
30+
<%if (project.useCpp==true) {%>
2831
5E46D8CB2428F78900513E24 /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../cpp/example.cpp; sourceTree = "<group>"; };
2932
5E46D8CC2428F78900513E24 /* example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../cpp/example.h; sourceTree = "<group>"; };
33+
<%}%>
3034
B3E7B5881CC2AC0600A0062D /* <%= project.name %>.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = <%= project.name %>.h; sourceTree = "<group>"; };
3135
B3E7B5891CC2AC0600A0062D /* <%= project.name %>.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = <%= project.name %>.mm; sourceTree = "<group>"; };
3236
/* End PBXFileReference section */
@@ -53,8 +57,10 @@
5357
58B511D21A9E6C8500147676 = {
5458
isa = PBXGroup;
5559
children = (
60+
<%if (project.useCpp==true) {%>
5661
5E46D8CB2428F78900513E24 /* example.cpp */,
5762
5E46D8CC2428F78900513E24 /* example.h */,
63+
<%}%>
5864
B3E7B5881CC2AC0600A0062D /* <%= project.name %>.h */,
5965
B3E7B5891CC2AC0600A0062D /* <%= project.name %>.mm */,
6066
134814211AA4EA7D00B7C361 /* Products */,
@@ -118,7 +124,9 @@
118124
isa = PBXSourcesBuildPhase;
119125
buildActionMask = 2147483647;
120126
files = (
127+
<%if (project.useCpp==true) {%>
121128
5E46D8CD2428F78900513E24 /* example.cpp in Sources */,
129+
<%}%>
122130
5E555C0D2413F4C50049A1A2 /* <%= project.name %>.mm in Sources */,
123131
);
124132
runOnlyForDeploymentPostprocessing = 0;

0 commit comments

Comments
 (0)