urbanairship / react-native-airship

Airship React Native module
Other
88 stars 62 forks source link

After April 2023 Apple deployment target & XCode 14.3 update fails to compile #509

Closed AndrewKirkovski closed 1 year ago

AndrewKirkovski commented 1 year ago

After April 2023 Apple requires to use deployment target 16.1 and recent XCode 14.3 After upgrading, app fails to Archive

Preliminary Info

What Airship dependencies are you using?

urbanairship-react-native 14.6.1 react-native 0.69.10

What are the versions of any relevant development tools you are using?

XCode 14.3

Report

What unexpected behavior are you seeing?

Getting an error

/

/ios/Pods/Airship/Airship/AirshipCore/Source/Shapes.swift:30:16 Initializer for conditional binding must have Optional type, not 'Color' //ios/Pods/Airship/Airship/AirshipCore/Source/Shapes.swift:38:16 Initializer for conditional binding must have Optional type, not 'Color'

What is the expected behavior?

App compiles as before

What are the steps to reproduce the unexpected behavior?

N.A.

Do you have logging for the issue?

N.A.

rlepinski commented 1 year ago

This is addressed in 15.x, any chance you can update?

Going from 14.x -> 15.x is a bit more involved - https://github.com/urbanairship/react-native-airship/blob/main/MIGRATION.md

AndrewKirkovski commented 1 year ago

Would it work if I bump Airship POD for now like this? Might not have time for full 14->15 migration right now

diff --git a/node_modules/urbanairship-react-native/urbanairship-react-native.podspec b/node_modules/urbanairship-react-native/urbanairship-react-native.podspec
index 9e8fcda..a41aff2 100644
--- a/node_modules/urbanairship-react-native/urbanairship-react-native.podspec
+++ b/node_modules/urbanairship-react-native/urbanairship-react-native.podspec
@@ -13,5 +13,5 @@ require "json"
   s.source       = { :git => "https://github.com/urbanairship/react-native-module.git", :tag => "{s.version}" }
   s.source_files  = "ios/**/*.{h,m}"
   s.dependency "React-Core"
-  s.dependency "Airship", "16.10.7"
+  s.dependency "Airship", "16.11.3"
 end
rlepinski commented 1 year ago

That should be fine

sridharsaminathn commented 1 year ago

Any update on this? Xcode 14.3.1 is out now

rlepinski commented 1 year ago

This has been addressed in 15.x, so updating to 15 or newer will fix it.

rlepinski commented 1 year ago

https://github.com/urbanairship/react-native-airship/tree/release-14.6.2

I am currently trying to validate it

rlepinski commented 1 year ago

We bumped the compileSdkVersion, so doing a minor release instead - https://github.com/urbanairship/react-native-airship/tree/release-14.7.0

sridharsaminathn commented 1 year ago

We bumped the compileSdkVersion, so doing a minor release instead - https://github.com/urbanairship/react-native-airship/tree/release-14.7.0

This fixed in 14.7.0 ?

rlepinski commented 1 year ago

I just published 14.7.0. It should be compatible with Xcode 14.3+