Skip to content

Commit

Permalink
fix(ci): ios build (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
kioqq authored Jun 22, 2023
1 parent 4c9c9f5 commit 594dc64
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 22 deletions.
5 changes: 4 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ platform :ios do
workspace: "ios/haqq.xcworkspace",
scheme: "haqq",
export_method: "app-store",
xcargs: "-UseModernBuildSystem=YES"
xcargs: "-UseModernBuildSystem=YES",
silent: true,
xcodebuild_formatter: "xcbeautify",
use_system_scm: true
)

pilot(
Expand Down
21 changes: 11 additions & 10 deletions ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import Foundation
import UIKit
import React
import FirebaseCore

func clearKeychainIfNecessary() {
// Checks whether or not this is the first time the app is run
Expand Down Expand Up @@ -45,49 +46,49 @@ class AppDelegate: RCTAppDelegate {

FirebaseApp.configure()
let app = super.application(application, didFinishLaunchingWithOptions: launchOptions);

RNSplashScreen.show()

return app;
}

@objc
func concurrentRootEnabled() -> Bool {
// Switch this bool to turn on and off the concurrent root
return true
}

override func sourceURL(for bridge: RCTBridge!) -> URL! {
#if DEBUG
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
return Bundle.main.url(forResource: "main", withExtension: "jsBundle")
#endif
}

override func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return RCTLinkingManager.application(application, open: url, options: options)
}

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
return RCTLinkingManager.application(application, continue: userActivity, restorationHandler: restorationHandler)
}

override func applicationDidEnterBackground(_ application: UIApplication) {
let blurEffect = UIBlurEffect(style: .dark)
let blurEffectView = UIVisualEffectView(effect: blurEffect)
//always fill the view
blurEffectView.frame = self.window?.bounds ?? CGRect.zero
blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
blurEffectView.tag = 181099

self.window?.addSubview(blurEffectView)
}

override func applicationDidBecomeActive(_ application: UIApplication) {
self.window?.viewWithTag(181099)?.removeFromSuperview()
}

func getModuleName() -> String {
if UIDevice.current.isJailBroken {
return "jailbrake"
Expand Down
5 changes: 4 additions & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ target 'haqq' do

pod "ToastViewSwift"

$RNFirebaseAsStaticFramework = true

target 'haqqTests' do
inherit! :complete
# Pods for testing
Expand All @@ -65,11 +67,12 @@ target 'haqq' do
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)

installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" # <--- this
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1096,10 +1096,10 @@ SPEC CHECKSUMS:
RNAppleAuthentication: 0571c08da8c327ae2afc0261b48b4a515b0286a6
RNCAsyncStorage: ddc4ee162bfd41b0d2c68bf2d95acd81dd7f1f93
RNCClipboard: 3f0451a8100393908bea5c5c5b16f96d45f30bfc
RNFBAnalytics: 525293b9845d27f00e6609b90bb4b76da8e4a292
RNFBApp: 7da45c10070789f5e4337a5534139976e8d74e0a
RNFBDynamicLinks: e9f12e59be249375b91c546faac2c2fe04b6e339
RNFBMessaging: fd543fa2aa4688fac4e88b1ce54e39cac4339b32
RNFBAnalytics: 87fe286d542f14655e73981499576f46a2091062
RNFBApp: 10aa0ab560e30186c39a9756846945cac6499ea7
RNFBDynamicLinks: 828e5d80701c7dc696ceda676498bc9324c8e5be
RNFBMessaging: a0cf20be8f41d89af98f5611d5db432c59371f68
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: dec4645026e7401a0899f2846d864403478ff6a5
RNGoogleSignin: ccaa4a81582cf713eea562c5dd9dc1961a715fd0
Expand All @@ -1120,6 +1120,6 @@ SPEC CHECKSUMS:
Yoga: f7decafdc5e8c125e6fa0da38a687e35238420fa
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 150a5ffefe2377152d1b3ff799662db7c624388a
PODFILE CHECKSUM: 4f91b53d97190063bfc6cdf79aeae3e641405466

COCOAPODS: 1.12.1
1 change: 0 additions & 1 deletion ios/haqq-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#import <React/RCTBundleURLProvider.h>

#import <RNSplashScreen.h>
#import <Firebase.h>

#import <React/RCTRootView.h>
#import <React/RCTAppSetupUtils.h>
Expand Down
8 changes: 5 additions & 3 deletions ios/haqq.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,9 @@
83CBB9F71A601CBA00E9B192 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1210;
LastUpgradeCheck = 1430;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
Expand Down Expand Up @@ -1235,7 +1236,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_C_LANGUAGE_STANDARD = "compiler-default";
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -1308,7 +1309,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_C_LANGUAGE_STANDARD = "compiler-default";
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
Expand All @@ -1335,6 +1336,7 @@
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion ios/haqq.xcodeproj/xcshareddata/xcschemes/haqq.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1210"
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down

0 comments on commit 594dc64

Please sign in to comment.