crowdplaysdk 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -97,7 +97,7 @@ Bare React Native (no Expo):
97
97
  npm install crowdplaysdk
98
98
  cd ios && pod install
99
99
  gem install xcodeproj --user-install # one time
100
- ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
100
+ ruby ../node_modules/crowdplaysdk/ios/wire.rb <YourProjectName> # from ios/
101
101
  ```
102
102
 
103
103
  `wire.rb` is idempotent. It adds the compiled CrowdPlaySDK Swift package,
@@ -107,6 +107,18 @@ keeps explicit Swift modules on for the app target (React Native 0.8x turns
107
107
  them off project-wide on Xcode 26, which breaks importing the compiled
108
108
  engine). There is no CocoaPod of our own, so your Podfile stays untouched.
109
109
 
110
+ **Updating.** `npm install crowdplaysdk@latest`, then wire again so the
111
+ engine moves with the bridge: Expo, `npx expo prebuild` (or a build that
112
+ runs prebuild; an `ios/` folder committed to git is not re-wired by
113
+ `eas build`, so run prebuild yourself and commit the result); bare React
114
+ Native, re-run `wire.rb`. Since 0.6.3 that also re-pins the engine to the
115
+ version this package ships with. 0.6.2 and older only added the engine
116
+ the first time, so upgrading in place kept the old engine. Before the
117
+ next local build, clean (Xcode: Product > Clean Build Folder): an
118
+ incremental build can reuse Xcode's cached copy of the previous engine's
119
+ interface and fail on new symbols such as `storageWarning`. EAS Build
120
+ starts clean every time.
121
+
110
122
  **2. Declare permissions in Info.plist** (bare React Native only; the Expo
111
123
  plugin does this for you).
112
124
 
package/ios/wire.rb CHANGED
@@ -6,7 +6,8 @@
6
6
  # ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
7
7
  #
8
8
  # What it does (idempotent; safe to re-run):
9
- # 1. adds the CrowdPlaySDK Swift package (compiled engine) to the project
9
+ # 1. adds the CrowdPlaySDK Swift package (compiled engine) to the project,
10
+ # or re-pins an existing one to SDK_VERSION (an upgrade)
10
11
  # 2. copies the three bridge files into your app group + target
11
12
  # 3. creates/points the Swift bridging header at the React headers, raises
12
13
  # the app target to iOS 17 and keeps explicit Swift modules ON for it
@@ -44,17 +45,30 @@ target = project.targets.find { |t| t.name == project_name } ||
44
45
  project.targets.find { |t| t.product_type == 'com.apple.product-type.application' }
45
46
  abort 'no application target found' unless target
46
47
 
47
- # 1. CrowdPlaySDK Swift package (skip when already present).
48
- unless project.root_object.package_references.any? { |r| r.respond_to?(:repositoryURL) && r.repositoryURL == SDK_URL }
48
+ # 1. CrowdPlaySDK Swift package, pinned to exactly SDK_VERSION. An existing
49
+ # reference is re-pinned, never skipped: step 2 always replaces the bridge
50
+ # files, and a new bridge against the old engine does not compile (0.6.2
51
+ # upgraded in place kept engine 0.5.3 and failed on storageWarning, D-151).
52
+ requirement = { 'kind' => 'exactVersion', 'version' => SDK_VERSION }
53
+ existing = project.root_object.package_references.select { |r| r.respond_to?(:repositoryURL) && r.repositoryURL == SDK_URL }
54
+ if existing.empty?
49
55
  pkg = project.new(Xcodeproj::Project::Object::XCRemoteSwiftPackageReference)
50
56
  pkg.repositoryURL = SDK_URL
51
- pkg.requirement = { 'kind' => 'exactVersion', 'version' => SDK_VERSION }
57
+ pkg.requirement = requirement
52
58
  project.root_object.package_references << pkg
53
59
  dep = project.new(Xcodeproj::Project::Object::XCSwiftPackageProductDependency)
54
60
  dep.package = pkg
55
61
  dep.product_name = 'CrowdPlaySDK'
56
62
  target.package_product_dependencies << dep
57
63
  puts "+ CrowdPlaySDK package #{SDK_VERSION}"
64
+ else
65
+ existing.each do |pkg|
66
+ next if pkg.requirement == requirement
67
+
68
+ was = (pkg.requirement || {})['version'] || (pkg.requirement || {})['minimumVersion'] || 'unpinned'
69
+ pkg.requirement = requirement
70
+ puts "+ CrowdPlaySDK package #{was} -> #{SDK_VERSION}"
71
+ end
58
72
  end
59
73
 
60
74
  # 2. Bridge files into the app group + target.
package/llms.txt CHANGED
@@ -81,6 +81,14 @@ EXPO (managed, prebuild or EAS Build; app builders such as X1):
81
81
  Xcode project. Do not add those Info.plist keys or any native code
82
82
  yourself. Expo SDK 50 or newer.
83
83
  3. Rebuild: npx expo prebuild, a development build, or eas build.
84
+ UPDATING the package later: npx expo prebuild again so the plugin
85
+ re-pins the engine to the version the package ships with (0.6.3+). An
86
+ ios/ folder committed to git is not re-wired by eas build on its own:
87
+ run prebuild and commit the result. Then clean before a LOCAL build
88
+ (Xcode: Product > Clean Build Folder); an incremental build can reuse
89
+ the previous engine's cached interface and fail with "has no member
90
+ '$storageWarning'". That error after an update means "clean", never
91
+ "edit the bridge". EAS Build starts clean.
84
92
  4. Expo Go and any preview that never ran the plugin cannot load native
85
93
  modules: there the consent text, the call and recording fail with a
86
94
  clear error and the video view shows a placeholder. That is EXPECTED;
@@ -92,7 +100,8 @@ BARE REACT NATIVE (no Expo):
92
100
  2. cd ios && pod install (installs RN's own pods; CrowdPlay has none)
93
101
  3. gem install xcodeproj --user-install (one-time; wire.rb needs it
94
102
  and says so itself if missing)
95
- ruby node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
103
+ ruby ../node_modules/crowdplaysdk/ios/wire.rb <YourProjectName>
104
+ (from ios/, where step 2 left you; wire.rb must run there)
96
105
  Idempotent. It: adds the CrowdPlaySDK binary Swift package to the Xcode
97
106
  project, copies the three native bridge files into the app target,
98
107
  creates/points the Swift bridging header at the React headers, raises
@@ -100,7 +109,10 @@ BARE REACT NATIVE (no Expo):
100
109
  sets SWIFT_ENABLE_EXPLICIT_MODULES = YES on the app target (React Native
101
110
  0.8x sets it to NO project-wide on Xcode 26, and with implicit modules
102
111
  the compiled engine's interface cannot be imported). Rerun it any time;
103
- it never duplicates. Never undo that setting to fix an unrelated error.
112
+ it never duplicates, and after updating the package it re-pins the
113
+ engine to the version the package ships with (0.6.3+); then Product >
114
+ Clean Build Folder before building. Never undo that setting to fix an
115
+ unrelated error.
104
116
  4. Info.plist: NSMicrophoneUsageDescription, NSCameraUsageDescription,
105
117
  UIBackgroundModes = [audio]. A missing usage string makes iOS kill
106
118
  the app at first mic/camera access (uncatchable).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crowdplaysdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "CrowdPlay lossless conversation capture for React Native (iOS). Studio-grade per-participant recording during live video calls, delivered to CrowdPlay automatically.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",