Closed leons1767 closed 1 year ago
Hello! Checking that...
@leons1767 can you share cloud build link? If it sensitive, then it's let's try to find a problem without it.
I primarily expect that Expo version you use have an older version of Swift. Can you tell what Expo version do you use? Also does it happen during debug or production builds?
My empty projects with Adapty were successfully built: My iOS Development logs | iOS Production logs
@divanc I'm using Expo SDK46 and the error happen when I try to build a developmemt build/client. The development build is successful after I stripped out Adapty SDK.
eas build --profile development --platform ios
Did you build yours using expo (local) or eas?
@divanc I tried again to build using eas, this time building a production build
eas build --profile production --platform ios
The build fail with the following errors
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Packaging react-native Pods/RCT-Folly » libRCT-Folly.a
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ CompileSwift normal arm64 (in target 'Adapty' from project 'Pods')
▸ CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Adapty' from project 'Pods')
▸ CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ASN1Decoder' from project 'Pods')
▸ (3 failures)
+-------------+-------------------------+
| Build environment |
+-------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.206.1 |
| sdk | iPhoneOS15.5.sdk |
+-------------+-------------------------+
I tried building from scratch with both Expo SDK46 and SDK48 with the following sequence, and I could see the same errors in SDK46, while SDK48 does not have the errors. Unfortunately, I am not able to upgrade to SDK48 at the moment because it mandates RN0.71.
npx expo init adaptyExpoTest --template expo-template-blank@sdk-46
cd adaptyExpoTest
npx expo install expo-dev-client
npx expo install react-native-adapty
eas build --profile development --platform ios
No codes are added, just a blank template
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » EventsManager.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » EventsStorage.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » EventsStorage+UserDefaults.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protoco
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » EventType.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FallbackPaywalls.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchAllProductsRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchAllProductVendorIdsRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchEventsConfigRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchPaywallRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchProfileRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » FetchUIPaywallConfigurationRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » Font.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » Font+Decodable.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPCancelable.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPCodableConfiguration.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPConfiguration.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPDataResponse.Validator.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPEncodableRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPEndpoint.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPError.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPMethod.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
› Compiling react-native-adapty Pods/Adapty » HTTPRequest.swift
❌ (ios/Pods/Adapty/Sources/Events/Entities/EventType.swift:55:36)
53 | case let .system(value):
54 | try container.encode(Name.system, forKey: .type)
> 55 | let data = try Backend.encoder.encode(value)
| ^ protocol 'AdaptySystemEventParameters' as a type cannot conform to 'Encodable'
56 | let string = String(decoding: data, as: UTF8.self)
57 | try container.encode(string, forKey: .customData)
58 | }
Fixed the issue in Expo SDK46 by setting the xcode version in fastlane gym to latest in eas.json, "image": "latest"
"build": {
"development": {
"channel": "development",
"ios": {
"enterpriseProvisioning": "adhoc",
"image": "latest"
},
"developmentClient": true,
"distribution": "internal"
},
Wow, don't even know what this does. We should support expo 46 certainly. Thanks for figuring out!
It is not obvious, took me a while to figure it out. "image" is basically the iOS build server image with the corresponding MacOS and XCode version among others.
Putting it down here for the benefits of others.
Cheers.
Description
Hello,
I tried to build for iOS with Expo EAS build today, and the build failed with the above error
Version
v2.4.6
What platforms are you seeing the problem on?
iOS
System info