-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild_example.sh
More file actions
executable file
·155 lines (125 loc) · 10.5 KB
/
build_example.sh
File metadata and controls
executable file
·155 lines (125 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/sh
# Get location of the script itself .. thanks SO ! http://stackoverflow.com/a/246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
PROJECT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
CONFIGURATION="Release"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
# Prepare plist to build examples
cat << EOF > Info_ipa.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
<key>signingStyle</key>
<string>manual</string>
<key>teamID</key>
<string>SXWV5Z47NK</string>
<key>provisioningProfiles</key>
<dict>
<key>com.flashphoner.ios.TwoWayStreaming</key>
<string>$2</string>
<key>com.flashphoner.ios.MediaDevices</key>
<string>$2</string>
<key>com.flashphoner.ios.Player</key>
<string>$2</string>
<key>com.flashphoner.ios.TwoPlayers</key>
<string>$2</string>
<key>com.flashphoner.ios.Streamer</key>
<string>$2</string>
<key>com.flashphoner.ios.StreamRecording</key>
<string>$2</string>
<key>com.flashphoner.ios.Conference</key>
<string>$2</string>
<key>com.flashphoner.ios.VideoChat</key>
<string>$2</string>
<key>com.flashphoner.ios.PhoneMinVideo</key>
<string>$2</string>
<key>com.flashphoner.ios.PhoneMin</key>
<string>$2</string>
<key>com.flashphoner.ios.ClickToCall</key>
<string>$2</string>
<key>com.flashphoner.ios.GPUImageDemo</key>
<string>$2</string>
<key>com.flashphoner.ios.TwoWayStreamingSwift</key>
<string>$2</string>
<key>com.flashphoner.ios.MediaDevicesSwift</key>
<string>$2</string>
<key>com.flashphoner.ios.MCUClientSwift</key>
<string>$2</string>
<key>com.flashphoner.ios.ImageOverlaySwift</key>
<string>$2</string>
<key>com.flashphoner.ios.WebViewSwift</key>
<string>$2</string>
<key>com.flashphoner.ios.ScreenCapturer</key>
<string>AdHoc ScreenCapturer</string>
<key>com.flashphoner.ios.ScreenCapturer.ScreenCapturerExtension</key>
<string>AdHoc ScreenCapturerExtension</string>
<key>com.flashphoner.ios.GPUImageDemoSwift</key>
<string>$2</string>
<key>com.flashphoner.ios.CallKitDemoSwift</key>
<string>AdHoc CallKitDemo</string>
<key>com.flashphoner.ios.CallKitDemoSwift.CallKitIntentExtension</key>
<string>AdHoc CallKitIntentExtension</string>
<key>com.flashphoner.ios.MultiPlayerSwift</key>
<string>$2</string>
</dict>
</dict>
</plist>
EOF
rm -rf out-build
mkdir out-build
#install deps
pod install
#build and export
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "TwoWayStreaming" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/TwoWayStreaming -archivePath out-build/TwoWayStreaming
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/TwoWayStreaming.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "MediaDevices" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/MediaDevices -archivePath out-build/MediaDevices
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/MediaDevices.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "Player" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/Player -archivePath out-build/Player
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/Player.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "TwoPlayers" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/TwoPlayers -archivePath out-build/TwoPlayers
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/TwoPlayers.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "Streamer" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/Streamer -archivePath out-build/Streamer
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/Streamer.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "StreamRecording" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/StreamRecording -archivePath out-build/StreamRecording
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/StreamRecording.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "Conference" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/Conference -archivePath out-build/Conference
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/Conference.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "VideoChat" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/VideoChat -archivePath out-build/VideoChat
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/VideoChat.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "PhoneMinVideo" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/PhoneMinVideo -archivePath out-build/PhoneMinVideo
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/PhoneMinVideo.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "PhoneMin" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/PhoneMin -archivePath out-build/PhoneMin
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/PhoneMin.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "ClickToCall" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/ClickToCall -archivePath out-build/ClickToCall
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/ClickToCall.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "GPUImageDemo" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/GPUImageDemo -archivePath out-build/GPUImageDemo
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/GPUImageDemo.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "TwoWayStreamingSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/TwoWayStreamingSwift -archivePath out-build/TwoWayStreamingSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/TwoWayStreamingSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "MediaDevicesSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/MediaDevicesSwift -archivePath out-build/MediaDevicesSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/MediaDevicesSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "MCUClientSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/MCUClientSwift -archivePath out-build/MCUClientSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/MCUClientSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "ImageOverlaySwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/ImageOverlaySwift -archivePath out-build/ImageOverlaySwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/ImageOverlaySwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "WebViewSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/WebViewSwift -archivePath out-build/WebViewSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/WebViewSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "ScreenCapturerSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/ScreenCapturerSwift -archivePath out-build/ScreenCapturerSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/ScreenCapturerSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "GPUImageDemoSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/GPUImageDemoSwift -archivePath out-build/GPUImageDemoSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/GPUImageDemoSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "CallKitDemoSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/CallKitDemoSwift -archivePath out-build/CallKitDemoSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/CallKitDemoSwift.xcarchive -exportPath out-build
xcodebuild CODE_SIGN_STYLE=Automatic -workspace 'WCSExample.xcworkspace' -scheme "MultiPlayerSwift" -configuration="Release" clean archive OBJROOT=$(PWD)/out-build/MultiPlayerSwift -archivePath out-build/MultiPlayerSwift
xcodebuild -exportArchive -exportOptionsPlist Info_ipa.plist -archivePath out-build/MultiPlayerSwift.xcarchive -exportPath out-build
# Remove plist
rm -rf Info_ipa.plist
echo "Build complete"