Skip to content

Commit

Permalink
Merge pull request #266 from befovy/feature/build
Browse files Browse the repository at this point in the history
fix: action build  error
  • Loading branch information
befovy committed Jul 3, 2020
2 parents 524540b + f6bef1a commit 4af5795
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
flutter test
cd example && flutter test
- name: Build Apk
working-directory: example
run: |
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ dependencies {
// implementation(name: 'fijkplayer-full-release', ext: 'aar')

// fijkplayer-full include the java lib and native shared libs for armv5 armv7 arm64 x86 x86_64
implementation 'com.befovy.fijkplayer:fijkplayer-full:0.7.4'
implementation 'com.befovy.fijkplayer:fijkplayer-full:0.7.6'
implementation 'androidx.annotation:annotation:1.1.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public String lookupKeyForAsset(@NonNull String asset, @Nullable String packageN
if (TextUtils.isEmpty(packageName)) {
path = mBinding.getFlutterAssets().getAssetFilePathByName(asset);
} else {
//noinspection ConstantConditions
path = mBinding.getFlutterAssets().getAssetFilePathByName(asset, packageName);
}
} else if (mRegistrar != null) {
Expand Down
12 changes: 6 additions & 6 deletions docs/_docs/zh/3.1-replace-ijkplayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:

在 android/ijkplayer 目录中运行 `./gradlew :fijkplayer-full:assembleRelease` 可以编译产出 fijkplayer-full-release.aar

在本地 ios/IJKMediaPlayer/ 运行 `xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme FIJKPlayer-Universal` 可以编译产出 IJKPlayer.framework ,输出在 `ios/CocoaPodsPub` 文件夹中。
在本地 ios/IJKMediaPlayer/ 运行 `xcodebuild -project IJKMediaPlayer.xcodeproj -configuration Release -scheme Universal` 可以编译产出 IJKMediaPlayer.framework ,输出在 `ios/CocoaPodsPub` 文件夹中。

## 修改 ijkplayer 依赖方式

Expand All @@ -39,15 +39,15 @@ dependencies:
+ implementation(name: 'fijkplayer-full-release', ext: 'aar') // 去掉这行原先的注释
```

把文件 IJKPlayer.framework 复制到 ${fijkplayer}/ios/Frameworks 目录中。
把文件 IJKMediaPlayer.framework 复制到 ${fijkplayer}/ios/Frameworks 目录中。
修改文件 ${fijkplayer}/ios/fijkplayer.podsped 文件内容。
```diff
+ # 去掉这三行原先的注释
+ # 去掉这三行原先的注释
+ s.preserve_paths = 'Frameworks/*.framework'
+ s.vendored_frameworks = 'Frameworks/FIJKPlayer.framework'
+ s.vendored_frameworks = 'Frameworks/IJKPlayer.framework'
+ s.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '"$(PODS_ROOT)/Frameworks/"' }
- # s.dependency 'FIJKPlayer', '~> 0.3.8' // 注释掉这一行

- # s.dependency 'BIJKPlayer', '~> 0.3.8' // 把原先这一行注释掉
```


Expand Down
2 changes: 0 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29

ndkVersion "21.1.6352462"

defaultConfig {
applicationId "com.befovy.fijkplayer.demo"
minSdkVersion 16
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install! 'cocoapods', :disable_input_output_paths => true
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['ENABLE_BITCODE'] = 'YES'
end
end
end
13 changes: 3 additions & 10 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
PODS:
- BIJKPlayer (0.7.3)
- fijkplayer (0.8.4):
- BIJKPlayer (~> 0.7.3)
- Flutter
- Flutter (1.0.0)
- shared_preferences (0.0.1):
Expand All @@ -18,10 +16,6 @@ DEPENDENCIES:
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)

SPEC REPOS:
trunk:
- BIJKPlayer

EXTERNAL SOURCES:
fijkplayer:
:path: ".symlinks/plugins/fijkplayer/ios"
Expand All @@ -35,13 +29,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences_web/ios"

SPEC CHECKSUMS:
BIJKPlayer: 1ecf2e48a182e2e4618d47a01d04814ee4126c96
fijkplayer: df94cc554363066892cd2a6b1d94aaf9077fcb64
fijkplayer: a41c440645ea4c14c971de7f4870200910086497
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9

PODFILE CHECKSUM: d63691d44515f79607c497e269e550a53bee5d29
PODFILE CHECKSUM: e29d9f5cb58b624494541bb7b0cda38d4433ee11

COCOAPODS: 1.9.1
COCOAPODS: 1.9.3
28 changes: 16 additions & 12 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 7SUQ9UM9P2;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -365,9 +366,11 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7SUQ9UM9P2;
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -402,8 +405,6 @@
"-framework",
"\"Foundation\"",
"-framework",
"\"IJKPlayer\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"MobileCoreServices\"",
Expand All @@ -418,8 +419,9 @@
"-framework",
"\"Flutter\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.sample;
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
Expand Down Expand Up @@ -535,9 +537,11 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7SUQ9UM9P2;
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -572,8 +576,6 @@
"-framework",
"\"Foundation\"",
"-framework",
"\"IJKPlayer\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"MobileCoreServices\"",
Expand All @@ -588,8 +590,9 @@
"-framework",
"\"Flutter\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.sample;
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -599,9 +602,11 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 7SUQ9UM9P2;
ENABLE_BITCODE = NO;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
Expand Down Expand Up @@ -636,8 +641,6 @@
"-framework",
"\"Foundation\"",
"-framework",
"\"IJKPlayer\"",
"-framework",
"\"MediaPlayer\"",
"-framework",
"\"MobileCoreServices\"",
Expand All @@ -652,8 +655,9 @@
"-framework",
"\"Flutter\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.sample;
PRODUCT_BUNDLE_IDENTIFIER = com.befovy.fijkplayer.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
3 changes: 2 additions & 1 deletion ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ Icon?

/Flutter/Generated.xcconfig

Frameworks/FIJKPlayer.framework/
Frameworks/FIJKPlayer.framework/
Frameworks/IJKMediaPlayer.framework/
2 changes: 1 addition & 1 deletion ios/Classes/FijkPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.

#import <Foundation/Foundation.h>
#import <IJKPlayer/IJKPlayer.h>
#import <IJKMediaPlayer/IJKMediaPlayer.h>

#import <Flutter/FlutterPlugin.h>

Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/FijkPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#import <Flutter/Flutter.h>
#import <Foundation/Foundation.h>
#import <IJKPlayer/IJKPlayer.h>
#import <IJKMediaPlayer/IJKMediaPlayer.h>
#import <libkern/OSAtomic.h>
#import <stdatomic.h>

Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/FijkPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#import <AVKit/AVKit.h>
#import <Flutter/Flutter.h>
#import <IJKPlayer/IJKPlayer.h>
#import <IJKMediaPlayer/IJKMediaPlayer.h>
#import <MediaPlayer/MediaPlayer.h>

typedef NS_ENUM(int, FijkVoUIMode) {
Expand Down
8 changes: 5 additions & 3 deletions ios/fijkplayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ Flutter plugin for ijkplayer

s.static_framework = true

# @ uncomment next 3 lines to debug FIJKPlayer
# @ uncomment next 3 lines to debug or use your custom ijkplayer build
# 去除下面 3 行代码开头的注释 #,以便于进行调试或者使用自定义构建的 ijkplayer 产物
# s.preserve_paths = 'Frameworks/*.framework'
# s.vendored_frameworks = 'Frameworks/IJKPlayer.framework'
# s.vendored_frameworks = 'Frameworks/IJKMediaPlayer.framework'
# s.xcconfig = { 'LD_RUNPATH_SEARCH_PATHS' => '"$(PODS_ROOT)/Frameworks/"' }

s.libraries = "bz2", "z", "stdc++"
s.dependency 'Flutter'

# s.use_frameworks!
s.dependency 'BIJKPlayer', '~> 0.7.3'

s.dependency 'BIJKPlayer', '~> 0.7.6'

s.ios.deployment_target = '8.0'
end
Expand Down

0 comments on commit 4af5795

Please sign in to comment.