Skip to content

Commit

Permalink
chore: project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Ali committed Jun 24, 2024
1 parent ed072b5 commit 0a9f81e
Show file tree
Hide file tree
Showing 32 changed files with 1,091 additions and 9,101 deletions.
12 changes: 9 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ buck-out/
*.jsbundle

# CocoaPods
Apps/APN/ios/Pods/
Pods

package-lock.json
lib/module/index.js
.Bundle

# Yarn
.yarn/install-state.gz
yarn.lock

# Env to avoid accidental publishing workplace credentials
UntrackedEnv.swift
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "cio-native-sdks/customerio-ios"]
path = cio-native-sdks/customerio-ios
url = https://github.com/customerio/customerio-ios
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nmHoistingLimits: workspaces

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
46 changes: 46 additions & 0 deletions CustomerIOReactNative.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "CustomerIOReactNative"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/customerio/customerio-reactnative.git", :tag => "#{s.version}" }

s.source_files = "ios/wrappers/**/*.{h,m,mm,swift}"
s.dependency "CustomerIO/DataPipelines"
s.dependency "CustomerIO/MessagingInApp"
s.dependency "CustomerIO/MessagingPush"

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.

if respond_to?(:install_modules_dependencies, true)
install_modules_dependencies(s)

else
s.dependency "React-Core"

# Don't install the dependencies when we run `pod install` in the old architecture.
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
end
32 changes: 32 additions & 0 deletions CustomerIOReactNativePush.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))

Pod::Spec.new do |s|
s.name = "CustomerIOReactNativePush"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/customerio/customerio-reactnative.git", :tag => "#{s.version}" }

s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
}

s.default_subspec = 'APN'

s.subspec 'APN' do |ss|
ss.dependency "CustomerIO/MessagingPushAPN"
ss.source_files = "ios/apn/**/*.{h,m,mm,swift}"
end

s.subspec 'FCM' do |ss|
ss.dependency "CustomerIO/MessagingPushFCM"
ss.source_files = "ios/fcm/**/*.{h,m,mm,swift}"
end

end
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
1 change: 1 addition & 0 deletions cio-native-sdks/customerio-ios
Submodule customerio-ios added at 6af400
31 changes: 0 additions & 31 deletions customerio-reactnative-richpush.podspec

This file was deleted.

44 changes: 0 additions & 44 deletions customerio-reactnative.podspec

This file was deleted.

9 changes: 0 additions & 9 deletions ios/CustomerioInAppMessaging.m

This file was deleted.

39 changes: 0 additions & 39 deletions ios/CustomerioReactnative.m

This file was deleted.

Loading

0 comments on commit 0a9f81e

Please sign in to comment.